<%--
  Created by IntelliJ IDEA.
  User: Jing
  Date: 2024/11/18
  Time: 21:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri ="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <title>管理人个人设置</title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <%--    <script src="js/jquery-3.4.1.min.js" type="4bebc94b2db97a1f9680a39f-text/javascript"></script>--%>
    <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
    <script src="/js/bootstrap.min.js"></script>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/css2.css" rel="stylesheet">
    <%--    <link href="css/all.min.css" rel="stylesheet">--%>
    <%--    <link href="css/bootstrap-icons.css" rel="stylesheet">--%>
    <%--    <link href="css/owl.carousel.min.css" rel="stylesheet">--%>
    <link href="css/style.css" rel="stylesheet">
    <link href="css/messageBox.css" rel="stylesheet">

    <script>
        window.onload = function() {
            var errorMessage = "${errorMessage}";
            var successMessage = "${successMessage}";
            var messageBox = document.getElementById('messageBox');

            if (errorMessage) {
                messageBox.textContent = errorMessage;
                messageBox.style.display = 'block';
                setTimeout(function() {
                    messageBox.style.display = 'none';
                }, 2000);
            } else if (successMessage) {
                messageBox.textContent = successMessage;
                messageBox.style.display = 'block';
                setTimeout(function() {
                    messageBox.style.display = 'none';
                }, 2000);
            }
        };
    </script>
</head>
<body>
<div class="container-fluid position-relative bg-white d-flex p-0">

    <div class="sidebar pe-4 pb-3">
        <nav class="navbar bg-light navbar-light">
            <a href="admin?action=list" class="navbar-brand mx-4 mb-3">
                <h3 class="text-primary">网上请假系统</h3>
            </a>

            <div class="navbar-nav w-100">
                <a href="admin?action=adminList" class="nav-item nav-link active">个人设置</a>
                <a href="admin?action=list" class="nav-item nav-link">二级学院管理</a>
                <a href="instructor?action=list" class="nav-item nav-link ">辅导员信息管理</a>
            </div>
        </nav>
    </div>

    <div class="content">
        <nav class="navbar navbar-expand bg-light navbar-light px-4 py-0" style="height: 48px;">
            <div class="navbar-nav align-items-center ms-auto" style="">
                <div class="nav-item dropdown">
                    <a href="login.jsp" class="btn btn-outline-danger" style="margin-top: 17px; width: 65px; margin-left: 1000px; display: inline-block;">退出</a>
                    <input type="hidden" name="action" value=".../login.jsp">
                </div>
            </div>
        </nav>

        <div class="shadow-sm p-3 mb-5 bg-white rounded">
            <div class="container-fluid pt-4 px-4" style="background-color: #efefef; height: 600px;">
                <div class="bg-light text-center rounded p-4" style="height: 400px !important;">
                    <form action="admin?action=adminEdit" method="post">
                        <c:forEach items="${list}" var="admin">
                                <div class="contain">
                                    <input type="hidden" name="userid" value="${admin.userid}">
                                    <div class="input-group mb-3" style="width: 400px;">
                                        <div class="input-group-prepend">
                                            <button class="btn btn-outline-secondary" type="button" id="button-addon1">姓名</button>
                                        </div>
                                        <input type="text" class="form-control" placeholder="username" aria-label="Example text with button addon" aria-describedby="button-addon1" style="height: 40px;color: #495057" value="${admin.fullname}" name="fullname">
                                    </div>

                                    <div class="input-group mb-3" style="width: 500px;margin-top: 40px;">
                                        <div class="input-group-prepend">
                                            <button class="btn btn-outline-secondary" type="button" id="button-addon1">密码</button>
                                        </div>
                                        <input type="text" class="form-control" placeholder="password" aria-label="Example text with button addon" aria-describedby="button-addon1" style="height: 40px;color: #495057" value="${admin.password}" name="password">
                                    </div>

                                    <div class="input-group mb-3" style="width: 600px;margin-top: 40px;">
                                        <div class="input-group-prepend">
                                            <button class="btn btn-outline-secondary" type="button" id="button-addon1" style="width: 111px">手机号</button>
                                        </div>
                                        <input type="text" class="form-control" placeholder="name" aria-label="Example text with button addon" aria-describedby="button-addon1" style="height: 40px;color: #495057" value="${admin.telephone}" name="telephone">
                                    </div>

                                </div>

                        </c:forEach>

                        <div class="com">
                            <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalCenter-${admin.userid}" style="position: relative;margin-left: -951px;margin-top: 30px;background-color: #92d7f9;border-color: #c8ecce;width: 80px;">
                                修改
                            </button>
                            <div class="modal fade" id="exampleModalCenter-${admin.userid}" tabindex="-1" aria-labelledby="exampleModalCenterTitle" aria-hidden="true" >
                                <div class="modal-dialog modal-dialog-centered">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <h5 class="modal-title" id="exampleModalCenterTitle">确定修改吗?</h5>
                                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                                <span aria-hidden="true">&times;</span>
                                            </button>
                                        </div>
                                        <div class="modal-body">
                                            <p>若确定对信息进行修改，请点击确定.</p>
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                                            <button type="submit" class="btn btn-primary">确定</button>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="messageBox"></div>
<script src="js/main.js" type="4bebc94b2db97a1f9680a39f-text/javascript"></script>

</body>
</html>
